package com.base.interview.devtest.repository;

import com.base.interview.devtest.entity.UserEntity;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

public interface UserRepository extends PagingAndSortingRepository<UserEntity, Long>, JpaSpecificationExecutor<UserEntity> {
    UserEntity findByNameAndPassword(String name, String password);

    UserEntity findByEmailAndPassword(String email, String password);

    List<UserEntity> findByNameOrEmail(String name, String email);

    List<UserEntity> findByNameLike(String name);
}
